<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>系统配置管理</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/config/">系统配置列表</a></li>
		<shiro:hasPermission name="sys:config:edit">
			<li><a href="${ctx}/sys/config/form?sort=10">系统配置添加</a></li>
		</shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="config"
		action="${ctx}/sys/config/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
		<input id="pageSize" name="pageSize" type="hidden"
			value="${page.pageSize}" />
		<label>名称：</label>
		<form:input path="name" htmlEscape="false" 
			class="input-medium" />
		&nbsp;&nbsp;<label>标识 ：</label>
		<form:input path="item" htmlEscape="false" 
			class="input-medium" />
		&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit"
			value="查询" />
	</form:form> 
	<tags:message content="${message}" />
	<table id="contentTable"
		class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>名称</th>
				<th>标识</th>
				<th>值</th>
				<th>描述</th>
				<shiro:hasPermission name="sys:config:edit">
					<th>操作</th>
				</shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="config">
				<tr>
					<td>${config.name}</td>
					<td>${config.item}</td>
					<td>${config.value}</td>
					<td>${config.remarks}</td>
					<shiro:hasPermission name="sys:config:edit">
						<td><a href="${ctx}/sys/config/form?id=${config.id}">修改</a> 
							<a href="${ctx}/sys/config/delete?id=${config.id}"
							onclick="return confirmx('确认要删除该配置信息吗？', this.href)">删除</a> 
						</td>
					</shiro:hasPermission>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>